<?php
namespace Home\Model;
use Think\Model;
class CommandModel extends Model {
    public function getCommandList($cond=null){
    	$res = M('command')->where($cond)
    		->select();
    	return $res;
    }
    
    public function insertCommandInfo($data){
    	if(!$data){
    		return false;
    	}
    	$res = M('command')->add($data);
    	return $res;
    }
    
    public function getCommandInfo($cond){
    	if(!$cond){
    		return false;
    	}
    	$res = M('command')->where($cond)
    		->find();
    	return $res;
    }
    
    public function reviseCommandInfo($cond,$data){
    	if(!$cond || !$data){
    		return false;
    	}
    	$res = M('command')->where($cond)
    		->save($data);
    	return $res;
    
    	
    }
}